from tg.config import AppConfig, Bunch
from tg.environment import make_load_environment
import arkivo
from arkivo import model
from arkivo.lib import app_globals, helpers

base_config = AppConfig()
base_config.renderers = []

base_config.package = arkivo

#Set the default renderer
base_config.default_renderer = 'genshi'
base_config.renderers.append('genshi') 

#Configure the base SQLALchemy Setup
base_config.use_sqlalchemy = True
base_config.model = arkivo.model
#Configure the authentication backend
base_config.auth_backend = 'sqlalchemy'
base_config.sa_auth = Bunch()
base_config.sa_auth.dbsession = model.DBSession
base_config.sa_auth.user = model.User
base_config.sa_auth.user_criterion = model.User.user_name
base_config.sa_auth.user_id_column = 'user_id'

# override this if you would like to provide a different who plugin for 
# managing login and logout of your application
base_config.sa_auth.form_plugin = None
